package com.yy.util;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Delegate;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import java.util.ArrayList;
import java.util.List;

/**
 * @author lyy
 * @date 2021/12/09
 */
@Getter
@Setter
public class ValidList<E> implements List<E> {

    @Delegate
    @Valid
    @NotEmpty(message = "参数不能为空")
    public List<E> list = new ArrayList<>();

    @Override
    public String toString(){
        return list.toString();
    }

}
